get Cost Calculation
fun getCostCalculation(sec: Account, asOfDateInt: Int? = null, preparedTxns: TxnSet? = null, obtainCurrentBalanceToo: Boolean = false, unRealizedSaleTxn: SplitTxn? = null): CostCalculation
Returns a CostCalculation class for the given security account and given parameters. Added February 2024 by Stuart Beesley using the new CostCalculation class since MD2024(5100).
Return
CostCalculation class for the given security account and given parameters.
Since
MD2024(5100)
Parameters
sec
The security account.
as Of Date Int
The asof date (int) for the cost basis calculation (null will be derived to today/future)
prepared Txns
Normally null. Pass the txns (TxnSet) to be used to the class.
obtain Current Balance Too
Normally false. Useful when a future dated balance exists. A CC class for current date can be retrieved.
un Realized Sale Txn
Normally null. Pass an unRealizedSaleTxn (SplitTxn) to generate an unrealised gains sale.